//
//  FQDSearchHeaderView.m
//  FakeQDaily
//
//  Created by mewxiv on 9/30/16.
//  Copyright © 2016 Xensius. All rights reserved.
//

#import "FQDSearchHeaderView.h"

#import "Masonry.h"

@interface FQDSearchHeaderView ()

@end

@implementation FQDSearchHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self configureHeaderView];
    }
    return self;
}

- (void)configureHeaderView
{
    _titleLabel = [[UILabel alloc] init];
    _titleLabel.font = FQDRegularFontWithSize(16.0f);
    _titleLabel.text = @"文章";
    [self addSubview:_titleLabel];
    
    WeakSelf;
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@13);
        make.centerY.equalTo(weakSelf.mas_centerY);
    }];
    
    _resultLabel = [[UILabel alloc] init];
    _resultLabel.font = FQDRegularFontWithSize(12.0f);
    [self addSubview:_resultLabel];
    
    // 设置约束
    [_resultLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf.titleLabel.mas_right).offset(5);
        make.baseline.equalTo(weakSelf.titleLabel);
    }];
}

@end
